
var App={};App.CurrentVersion=430;App.apis=(function(){var List={};function loadCallback(api,response){if(response==-1){List[api].status='error';return;}
List[api].status='done';eval(response);var callbacks=List[api].callbacks;List[api].callbacks=[];for(var i=0;i<callbacks.length;i++)
if(callbacks[i])
callbacks[i]();}
return{LoadAPI:function(api,callback){if(!List[api]){List[api]={status:'waiting',callbacks:[callback]};App.ajax.GetFile("routines/compiler/plugin.php?url="+api+"&version="+Math.max(415,App.CurrentVersion),function(response){loadCallback(api,response);});}else
if(List[api].status=='done'){callback();}else
{List[api].callbacks.push(callback);}}}})();
App.array=(function(){function array_each(fn){for(var i=0;i<this.length;i++)
if(false==fn.call(this[i],i))
break;return this;}
function array_remove(item){for(var i=0;i<this.length;i++)
if(this[i]==item){this.splice(i,1);break;}
return this;}
function aray_find(item){for(var i=0;i<this.length;i++)
if(this[i]==item)
return i;return-1;}
function array_insert(item,pos){for(var i=this.length;i>pos;i--)
this[i]=this[i-1];this[pos]=item;return this;}
function array_move(oldpos,newpos){var item=this[oldpos];this.splice(oldpos,1);array_insert.call(this,item,newpos);return this;}
function array_extand(elem){if(!elem)elem=[];elem.each=array_each;elem.insert=array_insert;elem.move=array_move;elem.find=aray_find;elem.remove=array_remove;return elem;}
return{Extand:array_extand,each:array_each,insert:array_insert,move:array_move,find:aray_find,remove:array_remove}})();
App.func=(function(){function bind(context){var __method=this;return Extand(function(){return __method.apply(context,arguments);})}
function delay(timeout){var __method=this;var args=arguments;return Extand(function(){window.setTimeout(function(){return __method.apply(__method,args);},timeout);})}
function attributes(){var __method=this;var args=arguments;return Extand(function(){return __method.apply(this,args);})}
function group(){if(!arguments[0])return this;var __method=this;var args=arguments;return Extand(function(){__method.apply(this,arguments);for(var i=0;i<args.length;i++)
args[i].apply(this,arguments);});}
function Extand(func){func.bind=bind;func.delay=delay;func.attributes=attributes;func.group=group;return func;}
return{Extand:Extand,bind:function(func,context){return bind.call(func,context);},delay:function(func,timeout){return delay.call(func,timeout);},delayed:function(func,obj,timeout){return delayed.call(func,obj,timeout);},attributes:function(func){return attributes.apply(func,Array.prototype.slice.call(arguments,1));},group:function(){if(!arguments[1])return arguments[0];return group.apply(arguments[0],Array.prototype.slice.call(arguments,1));},emptyFunction:function(){}};})();
App.ajax=(function(){var head=document.getElementsByTagName('head').item(0);return{include:function(url){var script=document.createElement('script');script.setAttribute('src',url+'&version='+App.CurrentVersion);script.setAttribute('type','text/javascript');script.setAttribute("charset","ISO-8859-1");head.appendChild(script);},require:function(url){document.write("<script type='text/javascript' src='"+url+"'><\/script>");},CreateAJAXObject:function(){var xmlreq=false;if(window.XMLHttpRequest)
xmlreq=new XMLHttpRequest();else
if(window.ActiveXObject)
xmlreq=new ActiveXObject("Microsoft.XMLHTTP");return xmlreq;},GetFile:function(url,callback,context,data){var xmlreq=this.CreateAJAXObject();xmlreq.onreadystatechange=function(){if(xmlreq.readyState==4){try{if(callback)
callback.call(context,xmlreq.status==200?xmlreq.responseText:-1,data);}catch(e){}
xmlreq.onreadystatechange=App.func.emptyFunction;xmlreq=null;}};xmlreq.open("GET",url,true);xmlreq.send(null);},PostFile:function(url,postdata,callback,context,data){var xmlreq=this.CreateAJAXObject();xmlreq.onreadystatechange=function(){if(xmlreq.readyState==4){try{if(callback)
callback.call(context,xmlreq.status==200?xmlreq.responseText:-1,data);}catch(e){}
xmlreq.onreadystatechange=App.func.emptyFunction;xmlreq=null;}};xmlreq.open("POST",url,true);xmlreq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xmlreq.send(postdata);}}})();
App.event=(function(){function detach(elem,event,callback){if(elem.removeEventListener){elem.removeEventListener(event,callback,false);}else
if(elem.detachEvent){elem.detachEvent("on"+event,callback);}}
function attach(elem,event,callback){if(elem.addEventListener){elem.addEventListener(event,callback,false);}
else
if(elem.attachEvent)
{elem.attachEvent("on"+event,callback);}}
return{cancelEvent:function(event){if(!event)event=window.event;event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;},attach:attach,detach:detach}})();
App.dom=(function(){var head=document.getElementsByTagName('head')[0];var cssSelectors={};cssSelectors["."]=function(from,className){var results=[];if(typeof(className)=="string")
className=new RegExp("\\b"+className+"\\b","gi");App.array.each.call(from,function(){if(this.className.match(className))
results.push(this);});return results;}
cssSelectors["#"]=function(from,Id){var results=[];if(typeof(Id)=="string")
Id=new RegExp("\\b"+Id+"\\b","gi");App.array.each.call(from,function(){if(this.id.match(Id))
results.push(this);});return results;}
cssSelectors[" "]=function(from,tagName){var results=[];App.array.each.call(from,function(){App.array.each.call(this.getElementsByTagName(tagName),function(){results.push(this);});});return results;}
cssSelectors[">"]=function(from,tagName){var results=[];tagName=tagName.toUpperCase();App.array.each.call(from,function(){App.array.each.call(this.childNodes,function(){if(tagName=="*"||this.tagName==tagName)
results.push(this);});});return results;}
var STANDARD_SELECT=/^[^\s>+~]/;var STREAM=/[\s\[#.:>+~()@]|[^\s\[#.:>+~()@]+/g;var WHITESPACE=/\s*([\s>+~(),]|^|$)\s*/g;var IMPLIED_ALL=/([\s>+~,]|[^(]\+|^)([#.:@])/g;function cssSelect(selector,node){if(STANDARD_SELECT.test(selector))
selector=" "+selector;var selectors=selector.replace(WHITESPACE,"$1").replace(IMPLIED_ALL,"$1*$2").match(STREAM)||[];var from=[node];for(var i=0;i<selectors.length;i+=2){if(cssSelectors[selectors[i]]){results=cssSelectors[selectors[i]](from,selectors[i+1]);from=results;}}
return results;}
return{Array:App.array.Extand,addCSSSheet:function(text){var v_css_text=document.createElement('style');v_css_text.setAttribute("type","text/css");if(v_css_text.styleSheet){v_css_text.styleSheet.cssText=text;}else{var tt1=document.createTextNode(text);v_css_text.appendChild(tt1);}
head.appendChild(v_css_text);return v_css_text;},removeCSSSheet:function(sheet){if(sheet.parentNode==head){head.removeChild(sheet);return true;}else
return false;},addCSSLink:function(url){var v_css_link=document.createElement('link');v_css_link.rel='stylesheet'
v_css_link.type='text/css';head.appendChild(v_css_link);v_css_link.href=url;return v_css_link;},removeCSSLink:function(link){if(link.parentNode==head){head.removeChild(link);return true;}else
return false;},addClass:function(myClass,node){this.removeClass(myClass,node);node.className=String(node.className+" "+myClass).replace(/[\s]+/gi," ");return true;},hasClass:function(myClass,node){if(typeof(myClass)=="string")
myClass=new RegExp("\\b"+myClass+"\\b","gi");var ret=node.className.match(myClass);if(ret)
return ret[0];else
return false;},removeClass:function(myClass,node){if(typeof(myClass)=="string")
myClass=new RegExp("\\b"+myClass+"\\b","gi");node.className=node.className.replace(myClass," ").replace(/[\s]+/gi," ");},wrap:function(inner,outer){var wrapper=(typeof(outer)=="object")?outer:document.createElement(outer||"div");if(typeof(inner)=="string")
wrapper.innerHTML=inner;else
wrapper.appendChild(inner);return wrapper;},select:function(selector,node){var ret=[];if((node||document).querySelectorAll)
ret=(node||document).querySelectorAll(selector);else{var rules=selector.split(", ");for(var j=0;j<rules.length;j++)
ret=ret.concat(cssSelect(rules[j],node||document));}
return App.array.Extand(ret);}}})();
App.user=(function(){var LastActivity=0;function onActivity(){LastActivity=new Date().getTime();}
App.event.attach(document.body,"mousemove",onActivity);App.event.attach(document.body,"keydown",onActivity);return{HasActivity:function(custom_timeout){return(new Date().getTime()-LastActivity<(custom_timeout||30000));}}})();App.user.browser={ISIE6:(navigator.appVersion.search(/MSIE 6.0.+/)!=-1),ISIE7:(navigator.appVersion.search(/MSIE 7.0.+/)!=-1),ISIE8:(navigator.appVersion.search(/MSIE 8.0.+/)!=-1),ISIE:(navigator.appName=="Microsoft Internet Explorer"),ISFIREFOX:(navigator.appName=="Netscape"),ISOPERA:(navigator.userAgent.indexOf("Opera")!=-1),ISSAFARI:(navigator.userAgent.indexOf("Safari")!=-1),ISIPHONE:(navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i))?true:false,ISCOOKIESENABLED:(navigator.cookieEnabled)?true:false,lang:(navigator.browserLanguage)?(navigator.browserLanguage):navigator.language?navigator.language:"",country:""}
if(typeof(navigator.cookieEnabled)=="undefined"||App.user.browserISCOOKIESENABLED){document.cookie="testcookie";App.user.browser.ISCOOKIESENABLED=(document.cookie.indexOf("testcookie")!=-1)?true:false;}
if(App.user.browser.lang.indexOf("-")!=-1){App.user.browser.country=App.user.browser.lang.substr(App.user.browser.lang.indexOf("-")+1,5);App.user.browser.lang=App.user.browser.lang.substr(0,App.user.browser.lang.indexOf("-"));}
if(App.user.browser.lang!="fr"&&App.user.browser.lang!="es"&&App.user.browser.lang!="en")App.user.browser.lang="en";if(_L("fr"))App.user.browser.lang=_L("fr");App.user.screen=(function(){var this_obj={Width:0,Height:0};function Update(){if(!App.user.browser.ISIE){this_obj.Width=window.innerWidth;this_obj.Height=window.innerHeight;}else{this_obj.Width=document.documentElement.clientWidth;this_obj.Height=document.documentElement.clientHeight;}
if(!this_obj.Width||!App.search||!App.search.manager||typeof(App.search.manager.searchSetSize)!="function"||!App.dock||typeof(App.dock.setSize)!="function")
window.setTimeout(Update,50);else{App.search.manager.searchSetSize();App.dock.setSize();}}
Update();App.event.attach(window,"resize",Update);return this_obj;})();
function addSearchEngine()
{if(GetCookie('uStartAdvert')<2)SetCookie('uStartAdvert',2);if(App.user.browser.ISIE)
window.external.AddSearchProvider('plugins/ustart.xml');if(App.user.browser.ISFIREFOX){if((typeof window.sidebar=="object")&&(typeof window.sidebar.addSearchEngine=="function"))
window.sidebar.addSearchEngine("http://www.ustart.org/plugins/ustart.xml","http://www.ustart.org/favicon.ico",'uStart','Web');navigator.registerContentHandler('application/vnd.mozilla.maybe.feed','http://www.ustart.org/?rssurl=%s','uStart');}}
function ShowHelp(){OpenPopup('http://www.ustart.org/help/'+_L('help_fr_pop.html'),962,660);return true;}
function SetAsStartpage(alink){if(!GetCookie('uStartAdvert')<2)SetCookie('uStartAdvert',2);if(App.user.browser.ISIE){alink.style.behavior='url(#default#homepage)';alink.setHomePage('http://www.ustart.org');}}
function $G(id){return document.getElementById(id);}
var MenuButtonImg={"Menu":[0,5],"Close":[1,6],"Reduce":[2,7],"More":[3,8],"Help":[4,9],"Delete":[10,11],"Color":[12,13]}
function GetButtonImg(attr,posx,width){return'<IMG style="margin-bottom:-1px;background:url(include/skins/sprites.'+(App.user.browser.ISIE6?'gif':'png')+'?v='+Math.max(412,App.CurrentVersion)+') -'+posx+'px -12px;width:'+width+'px;height:12px;" src="JSblocks/img/s.gif" '+attr+'>';}
function GetMenuButtonImg(id){return'<IMG style="margin-bottom:-1px;background:url(include/skins/sprites.'+(App.user.browser.ISIE6?'gif':'png')+'?v='+Math.max(412,App.CurrentVersion)+') -'+MenuButtonImg[id][0]*12+'px 0px;width:12px;height:12px;" src="JSblocks/img/s.gif" onmouseover="this.style.backgroundPosition=\'-'+((MenuButtonImg[id][1])*12)+'px 0px\'" onmouseout="this.style.backgroundPosition=\'-'+(MenuButtonImg[id][0]*12)+'px 0px\'">';}
function GetIconImg(attr,posx,width){return'<IMG style="background:url(JSblocks/img/logos.gif?v='+Math.max(408,App.CurrentVersion)+') -'+posx+'px;width:'+width+'px;height:12px;" src="JSblocks/img/s.gif" '+attr+'>';}
function imgloaded(obj){with(obj)width=height="16";if(obj.previousSibling)
with(obj.previousSibling)width=height="0";}
function getimgurl(text)
{if(!text)return"";text=text.replace("http://","").replace("https://","");if(text.search("/")!=-1)
text=text.substr(0,text.search("/"));return text;}
function getfavicon(url)
{return"routines/rss2js/getfavicon.php?url="+escape(url);}
function getNumLines(text){var numlines=0;while(text.indexOf("\n")!=-1){numlines++;text=text.substr(text.indexOf("\n")+1,text.length);}
return numlines;}
function FixPng(img){if(document.all){img.parentNode.style.width=img.offsetWidth;img.parentNode.style.height=img.offsetHeight;img.parentNode.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src="'+img.src+'")';img.style.visibility='hidden';}}
function getURLParam(strParamName){var strReturn="";var strHref=window.location.href;if(strHref.indexOf("#")>-1)
strHref=strHref.substr(0,strHref.indexOf("#"));if(strHref.indexOf(strParamName)>-1)
if(strHref.indexOf("?")>-1){var strQueryString=strHref.substr(strHref.indexOf("?"));var aQueryString=strQueryString.split("&");for(var iParam=0;iParam<aQueryString.length;iParam++){if(aQueryString[iParam].toLowerCase().indexOf(strParamName+"=")>-1){var aParam=aQueryString[iParam].split("=");strReturn=aParam[1];break;}}}
while(strReturn.indexOf("+")>-1)strReturn=strReturn.replace("+"," ");return unescape(strReturn);}
function togledivdisplay(division)
{with(document.getElementById(division).style)
if(display=='none')
display='';else
display='none';}
function OpenSmartPopup(url,width,height,evt,title){if(App.user.browser.ISIE6)return OpenPopupNoReturn(url,width,height);var targ;if(!evt)evt=window.event;if(evt&&evt.target)
targ=evt.target;else if(evt&&evt.srcElement)
targ=evt.srcElement;if(targ&&targ.nodeType==3)
targ=targ.parentNode;if((App.user.browser.ISIE&&evt.button==4)||(!App.user.browser.ISIE&&evt.button==1)){targ.href=url;}else
targ.href='javascript:OpenPopupNoReturn("'+url+'",'+width+','+height+');';}
function OpenPopupNoReturn(url,width,height){window.open(url,'','width='+width+',height='+height+',scrollbars=yes,resizable=yes,top='+((screen.height-height)/2-30)+',left='+((screen.width-width)/2));}
function OpenPopup(url,width,height){return window.open(url,'','width='+width+',height='+height+',scrollbars=yes,resizable=yes,top='+((screen.height-height)/2-30)+',left='+((screen.width-width)/2));}
App.fx={};App.fx.animate=function(object,speed,easing,animfunc,callback){var easing_func={classic:function(step){return step>=100?1:step/100;},slide:function(step){return step>=100?1:1-Math.pow((step-100)/100,2);},bounce:function(step){return step>=100?1:1-Math.cos(step/10)*Math.exp(-step/20);}}
if(typeof(easing)!="function"){if(easing_func[easing])easing=easing_func[easing];else easing=easing_func.classic;}
speed=8000/speed;var pos=0;var step=0;var timerID=0;function run(){step+=speed;pos=easing(step);animfunc.call(object,pos);if(step<100)
timerID=window.setTimeout(run,80);else{timerID=0;if(callback)
callback.call(object,null);}}
run();return{stop:function(){if(timerID)
window.clearTimeout(timerID);},running:function(){return(timerID==0);}};}
App.fx.cancelAll=function(){if(this.cssFx)
this.cssFx.stop();if(this.propertyFx)
this.propertyFx.stop();return null;}
App.fx.animateProperty=function(element,rules,speed,easing,callback){var InitValues=[];for(var i in rules){InitValues[i]=parseFloat(element[i])||0;rules[i]=parseFloat(rules[i]||0)-InitValues[i];}
function anim(pos){for(var i in InitValues)
this[i]=InitValues[i]+rules[i]*pos;}
if(element.propertyFx)element.propertyFx.stop();element.propertyFx=App.fx.animate(element,speed,easing,anim,callback);return element.propertyFx;};App.fx.animateCSS=function(element,rules,speed,easing,callback){var InitValues=[];var currentStyle=element.currentStyle||window.getComputedStyle(element,null)||element.style;for(var i in rules){InitValues[i]=parseFloat(String(currentStyle[i]).match(/[\-.0-9]+/))||0;element.style[i]=String(rules[i]).replace(/[\-.0-9]+/,InitValues[i]);rules[i]=(parseFloat(String(rules[i]).match(/[\-.0-9]+/))||0)-InitValues[i];}
function anim(pos){for(var i in InitValues)
this.style[i]=this.style[i].replace(/[\-.0-9]+/,InitValues[i]+rules[i]*pos);}
if(element.cssFx)element.cssFx.stop();element.cssFx=App.fx.animate(element,speed,easing,anim,callback);return element.cssFx;};App.fx.hide=(function(){function end_hide(){this.style.display='none';this.style.overflow='';this.style.height='';}
return function(div,callback){if(div.style.display=='none')return App.fx.cancelAll.call(div);var height=Math.max(0,(div.offsetHeight-(parseInt(div.style.paddingBottom)||0)-(parseInt(div.style.paddingTop)||0)));div.style.height=height+'px';div.style.overflow='hidden';return App.fx.animateCSS(div,{height:'0px'},800,'slide',App.func.group(end_hide,callback));};})();App.fx.show=(function(){function end_show(){this.style.display='';this.style.overflow='';this.style.height='';}
return function(div,callback){if(div.style.display==''&&div.style.height=='')return App.fx.cancelAll.call(div);div.style.display='';div.style.height='';var height=Math.max(0,(div.offsetHeight-(parseInt(div.style.paddingBottom)||0)-(parseInt(div.style.paddingTop)||0)));div.style.overflow='hidden';div.style.height='0px';return App.fx.animateCSS(div,{height:height+'px'},800,'bounce',App.func.group(end_show,callback));}})();App.fx.fadeIn=(function(){function end_show(){this.style.display='';this.style[App.user.browser.ISIE?"filter":"opacity"]="";}
return function(div,callback){if(div.style.display!='none'&&div.style[App.user.browser.ISIE?"filter":"opacity"]=="")return App.fx.cancelAll.call(div);div.style.display='';if(App.user.browser.ISIE){if(div.style.filter=='')div.style.filter="alpha(opacity=0)";}else{if(div.style.opacity=='')div.style.opacity=0;}
return App.fx.animateCSS(div,App.user.browser.ISIE?{filter:"alpha(opacity=100)"}:{opacity:1},800,0,App.func.group(end_show,callback));}})();App.fx.fadeOut=(function(){function end_hide(){this.style.display='none';this.style[App.user.browser.ISIE?"filter":"opacity"]="";}
return function(div,callback){if(div.style.display=='none')return App.fx.cancelAll.call(div);if(App.user.browser.ISIE){if(div.style.filter=='')div.style.filter="alpha(opacity=100)";}else{if(div.style.opacity=='')div.style.opacity=1;}
return App.fx.animateCSS(div,App.user.browser.ISIE?{filter:"alpha(opacity=0)"}:{opacity:0},800,0,App.func.group(end_hide,callback));}})();
App.ui={};App.ui.ButtonHelper={GetHTML:function(Text){return'<span style="'+(App.user.browser.ISIE6?"position:relative;":"")+'display:block;margin-right:8px;height:18px;background:transparent url(include/skins/button_small.png) no-repeat left top;" onmouseover="this.style.backgroundPosition=\'left -18px\'"  onmouseout="this.style.backgroundPosition=\'left 0px\'"><span style="'+(App.user.browser.ISIE6?"position:relative;":"")+'cursor:pointer;font-weight:bold;height:14px;padding-right:8px;padding-left:8px;margin-right:-8px;padding-top:2px;padding-bottom:2px;display:block;background:transparent url(include/skins/button_end_small.png) no-repeat right top;"  onmouseover="this.style.backgroundPosition=\'right -18px\'"  onmouseout="this.style.backgroundPosition=\'right 0px\'">'+Text+'</span></span>';}}
App.ui.PickerHelper=(function(){var Elem=null;var options=null;function Refresh(){Elem.innerHTML="";var HTML="";for(var i=0;i<options.variables.length;i++){switch(options.variables[i].type){case"menu":HTML+=(i?"<br>":"")+'<div style="margin:-5px">';for(var j=0;j<options.variables[i].values.length;j++){HTML+='<div onmouseout="this.style.background=\'\'" onclick="App.ui.PickerHelper.Pick('+i+','+j+');" onmouseover="this.style.background=\'#ECECEC\'" style="cursor:pointer;padding:5px">'+options.variables[i].values[j]+'</div>';}
HTML+="</div>";break;case"splitter":HTML+="<div style='margin:5px 0px;border-top:1px solid grey;'></div>";break;case"icon":var num_icons=143;for(var j=0;j<num_icons;j++){HTML+='<div onclick="App.ui.PickerHelper.Pick('+i+','+j+');" style="width:16px;height:16px;cursor:pointer;float:left;margin:1px;background:url(include/skins/tab-icons-all.png) -'+(18*(j-16*parseInt(j/16)))+'px -'+
(18*parseInt(j/16))+'px"></div>';}
HTML+="<br clear='all'>";break;case"color_array":HTML+=(i?"<br>":"")+options.variables[i].name;for(var j=0;j<options.variables[i].values.length;j++){HTML+="<span style='float:left;background:rgb("+options.variables[i].values[j]+");width:16px;height:16px;cursor:pointer;"
+(options.variables[i].value==j?"border:1px solid #AAAAAA;margin:2px;":"margin:3px;")
+"' onclick='App.ui.PickerHelper.Pick("+i+","+j+");'></span>";}
HTML+="<br clear='all'>";break;case"html":HTML+=(i?"<br>":"")+options.variables[i].value;break;}}
Elem.innerHTML=HTML;}
return{Pick:function(var_id,val){options.variables[var_id].value=val;if(options.callback)
options.callback(var_id,val);else
this.Hide();},Show:function(attach,in_options){options=in_options;if(!options.width)options.width=68;if(!options.margin)options.margin=options.width;this.Hide();if(!Elem){Elem=document.createElement('span');Elem.onmouseup=App.event.cancelEvent;}
with(Elem.style){display='none';position="absolute";textAlign="left";marginLeft="-"+(options.margin)+"px";marginTop=""+14+"px";background="white";padding="5px";width=options.width+"px";border='1px solid #AAAAAA';zIndex="600";color="black";fontSize="11px";}
Refresh();attach.parentNode.insertBefore(Elem,attach);App.fx.show(Elem);if(Elem.offsetLeft<0)
Elem.style.marginLeft="-"+(options.margin+Elem.offsetLeft)+"px";App.event.attach(document,"mouseup",App.ui.PickerHelper.Hide)},Hide:function(){if(Elem)App.fx.hide(Elem);App.event.detach(document,"mouseup",App.ui.PickerHelper.Hide);}}})();App.ui.ColorPickerHelper={colors:['255,255,255','137,79,202','255,0,236','40,40,40','193,193,193','70,192,237','216,0,0','255,222,0','105,171,0'],colorNames:['white','purple','pink','black','grey','blue','red','yellow','green'],Show:function(attachNode,sel_color,ret_func){App.ui.PickerHelper.Show(attachNode,{variables:[{name:"",type:"color_array",value:sel_color,values:this.colors}],callback:function(name,value){sel_color=value;ret_func(value,App.ui.ColorPickerHelper.colors[value]);App.ui.PickerHelper.Hide();}});}}
App.ui.PreviewHelper=(function(){var PreviewTimer=null;var PreviewElement=null;function killPreview(){if(PreviewTimer)window.clearTimeout(PreviewTimer);if(PreviewElement)PreviewElement.parentNode.removeChild(PreviewElement);PreviewElement=null;PreviewElement=null;}
function onMouseOutEvent(){killPreview();this.onmouseout=null;}
return function(sourceNode,content,callback){killPreview();PreviewTimer=window.setTimeout(function(){PreviewElement=document.createElement("div");PreviewElement.innerHTML='<div style="position:absolute;color:black;text-decoration:none;z-index:200;background:url(include/skins/sidebar_preview_top.gif) scroll -100px top repeat-x;width:400px;min-width:300px;padding-top:8px;"><div style="background:#F7F7F7;border: 1px solid #BBBBBB;border-top:none;padding:4px;padding-bottom:10px;">'+content+'</div></div>';sourceNode.appendChild(PreviewElement);if(callback)PreviewTimer=window.setTimeout(callback,700);},500);sourceNode.onmouseout=onMouseOutEvent;}})();App.ui.DatePickerHelper={Show:function(elem){App.apis.LoadAPI('datepicker',function(){App.ui.DatePickerHelper.Show(elem);});}}
App.ui.OpacityAnimHelper={DisplayDiv:App.fx.fadeIn,HideDiv:App.fx.fadeOut};App.ui.HighlighBloc=function(elem,factor,raise){var blocDiv=typeof(elem)=="string"?$G(elem):elem;function end(){this.borderColor=this.borderWidth=this.borderStyle="";this.margin="5px";}
function anim(pos){var color=parseInt(Math.abs(2*255*(0.5-pos)));this.border="2px solid rgb(255,"+color+","+color+")";}
blocDiv.style.margin="3px";return App.fx.animate(blocDiv.style,1500,0,anim,end);}
function GetRGBColor(color){var colors;if(color.substr(0,1)=="#")
colors=[parseInt(color.substr(1,2),16),parseInt(color.substr(3,2),16),parseInt(color.substr(5,2),16)];else{colors=color.substr(4).split(",");if(colors.length<3)return[0,0,0];colors[0]=parseInt(colors[0]);colors[1]=parseInt(colors[1]);colors[2]=parseInt(colors[2].substr(0,colors[2].length-1));}
return colors;}
function scanf(string,format,answer){var Searchs=format.split("%");var CurAnsIndex=0;for(var CurIndex=0;CurIndex<Searchs.length-1;CurIndex++){var delimiter=Searchs[CurIndex+1].substr(0,1);Searchs[CurIndex+1]=Searchs[CurIndex+1].substr(1);var i=string.indexOf(Searchs[CurIndex]);var i2=string.indexOf(Searchs[CurIndex+1],i+Searchs[CurIndex].length);if(i==-1||i2==-1)break;if(delimiter=='s'){answer[CurAnsIndex]=string.substring(i+Searchs[CurIndex].length,i2);CurAnsIndex++;}
string=string.substr(i2);}
return string;}
var PopupHelper=(function(){var Div=null;var Title="";var Width=500;var cssAnim=null;return{ShowPopup:function(HTML,in_Title,in_Width){if(!Div){Div=document.createElement('span');with(Div.style){position='absolute';zIndex=300;display='none';top='160px';borderRadius="8px";}
$G("body_div").appendChild(Div);}
if(in_Title)Title=in_Title;Width=in_Width>0?in_Width:500;Div.innerHTML='<table width="100%" cellspacing="0" cellpadding="0"><tr style="background:url(include/skins/style/header_blue.png)"><td align="left" style="border-bottom:1px solid #009ADF;padding-left:5px;font-size:13px;"><b>'+Title+'</b></td><td align="right"  style="border-bottom:1px solid #009ADF"><img src="include/skins/close.gif" onclick="PopupHelper.HidePopup()" style="cursor:pointer"></td></tr><tr style="background:url(include/skins/back/back_default.png) repeat-x #FFFFFF"><td colspan="2" >'
+HTML+'</td></tr></table>';PopupHelper.DisplayPopup();},ShowPopupPage:function(page,Title,in_Width){App.ajax.GetFile(page+'_'+_L('fr')+".html",function(HTML){if(HTML!=-1)
PopupHelper.ShowPopup(HTML,Title,in_Width);else
App.ajax.GetFile(page+'_en.html',function(HTML){if(HTML!=-1)
PopupHelper.ShowPopup(HTML,Title,in_Width);});});},IsClosed:function(){return(Div.style.display=='none');},DisplayPopup:function(opacity){if(cssAnim)cssAnim.stop();if(App.user.screen.Width>Width)Div.style.left=(App.user.screen.Width/2-Width/2)+'px';else left="0px";Div.style.width=Width+"px";Div.style.border='1px solid #009ADF';cssAnim=App.fx.fadeIn(Div);},HidePopup:function(){Div.style.display="";if(cssAnim)cssAnim.stop();cssAnim=App.fx.fadeOut(Div);window.setTimeout(function(){if(Div.style.display=='none')Div.innerHTML="";},1000);}}})();var RssReader={ShowFeed:function(url,name){App.apis.LoadAPI("reader",function(){RssReader.Load(url,name)});},OpenNews:function(rsss_url,item_url){App.apis.LoadAPI("reader",function(){RssReader.Load(-1,-1);RssReader.OpenNews(rsss_url,item_url);});}};var MediaPlayer=(function(){return{PlayFile:function(url,type){var Container=document.getElementById('flashdiv');if(App.user.browser.ISIPHONE){Container.innerHTML+='<embed width="1px" height="1px" src="'+file+'" autoplay="true"/>';Container.style.display='';return true;}
var Content='';if(type=='audio'||url.search(".mp3")!=-1){Content+='<center><embed wmode="transparent" src="include/plugins/dewplayer.swf" flashvars="showtime=1&autoplay=yes&autostart=true&mp3='+url+'" width="220" height="20"/></center>';Container.innerHTML=Content;Container.style.display='';}else{var MIMEType=url.indexOf(".swf")!=-1?'application/x-shockwave-flash':url.indexOf(".m4v")!=-1?'video/m4v':url.indexOf(".m4a")!=-1?'audio/m4a':url.indexOf(".mp4")!=-1?'video/mp4':'';Content+='<embed src="'+url+'"   scale="ASPECT" allowfullscreen="true" type="'+MIMEType+'" width="498" height="498"/>';PopupHelper.ShowPopup(Content,_L('Media Player'),500);Container.innerHTML="";}}};})();var ShareHelper={Share:function(in_url,in_title,in_image){App.apis.LoadAPI("share",function(){ShareHelper.Share(in_url,in_title,in_image)});}};
App.data=(function(){var UserData={};var ToSave=null;var TimerSave=null;var IsSending=false;function readCookie(name){var cookiesText=document.cookie;var cookieValue="";var search=name+"=";var offset=cookiesText.lastIndexOf(search);if(offset!=-1){offset+=search.length;var end=cookiesText.indexOf(";",offset);if(end==-1)end=cookiesText.length;cookieValue=unescape(cookiesText.substring(offset,end));return cookieValue;}
return'';}
return{IsLocal:true,DataLoaded:function(name,data){UserData[name]=data;},Loaded:function(){if(!UserData['CurrentVersion']){App.ajax.require("routines/compiler/content.php?url=start&navlang="+App.user.browser.lang+"&timezone="+parseInt(new Date().getTimezoneOffset()/60))
if(getURLParam('preset'))
App.ajax.require("routines/compiler/js.php?url=tools/presets/"+getURLParam('preset')+'&version='+App.CurrentVersion);}
this.DataLoaded=null;this.Loaded=null;},Load:function(){this.Login=readCookie('Login');App.ajax.require("routines/login/udata_safe.php?op=read&v="+readCookie('LastUpdated')+(this.Login?'&l=1':''));},WriteRawCookie:function(name,value,temporary){var date_exp=new Date();date_exp.setTime(date_exp.getTime()+(6*31*24*3600000));document.cookie=name+"="+value+";path=/;"+(!temporary?"expires="+date_exp.toGMTString()+";":'');},SaveCookies:function(){IsSending=true;TimerSave=0;this.WriteRawCookie("LastUpdated",new Date().getTime());var Text="&_bg=1";for(var name in ToSave){Text+="&"+name+"="+escape(JSONHelper.ToText(UserData[name]));}
Text+="&_ed=1";ToSave=null;App.ajax.PostFile("routines/login/udata_safe.php?op=save",Text,function(response){if(response)
eval(response);IsSending=false;if(ToSave!=null)
TimerSave=window.setTimeout("App.data.SaveCookies();",300);},null,null);},ReloadPage:function(){if(!IsSending&&!TimerSave)window.setTimeout("location.replace(location.href.indexOf('#')>-1?location.href.substr(0,location.href.indexOf('#')):location);",100);else window.setTimeout("App.data.ReloadPage();",100);},GetCookie:function(name){return UserData[name];},SetCookie:function(name,value){if(name&&(typeof(value)=="object"||UserData[name]!=value)&&typeof(value)!="undefined"&&!(value==''&&typeof(UserData[name])=="undefined")){UserData[name]=value;if(this.Loaded!=null)return;if(!ToSave)ToSave={};ToSave[name]=1;if(!IsSending){if(TimerSave){clearTimeout(TimerSave);TimerSave=0;}
TimerSave=window.setTimeout("App.data.SaveCookies();",300);}}}}})();App.data.Load();function SetCookie(name,value){return App.data.SetCookie(name,value);}
function GetCookie(name){return App.data.GetCookie(name);}
function DisconnectUser(){document.cookie="Login=;expires=-1;path=/";document.cookie="PasswordEnc=;expires=-1;path=/";App.data.WriteRawCookie('LastUpdated',new Date().getTime());App.data.ReloadPage();}
function Crypt(s){var ns="";for(var i=0;i<s.length;i++)ns+=String.fromCharCode(s.charCodeAt(i)+i-4);return ns;}
function Logged(user,pass,permanent){App.data.WriteRawCookie('LastUpdated',new Date().getTime());App.data.WriteRawCookie("Login",user,!permanent);App.data.WriteRawCookie("PasswordEnc",escape(Crypt(pass)),!permanent);App.data.ReloadPage();}
function LoginUser(form){if(!form.user.value.length)return alert(_L('Erreur'));form.submiter.disabled=true;form.submiter.value=_L("Chargement en cours.....");App.ajax.GetFile("routines/login/login.php?user="+escape(form.user.value)+"&pass="+escape(Crypt(form.pass.value)),function(response){switch(response){case'OK':Logged(form.user.value,form.pass.value,form.permanent.checked);break;case'NOTEXISTS':if(confirm(_L('Ce nom d\'utilisateur n\'existe pas, voulez-vous créer un compte?')))
ShowRegisterBox();break;case'ERROR':alert(_L('Informations de connexion incorrectes'));break;case-1:alert(_L('Erreur'));break;}
form.submiter.disabled=false;form.submiter.value=_L('Se connecter');});}
function SuscribeUser(form){if(!form.user.value.length)return alert(_L('Veuillez vérifier votre nom d\'utilisateur'));if(form.pass.value!=form.pass1.value)return alert(_L('Veuillez vérifier votre mot de passe'));if(form.email.value.indexOf("@")==-1)return alert(_L('Veuillez vérifier votre email'));form.submiter_create.value=_L("Chargement en cours.....");form.submiter_create.disabled=true;App.ajax.GetFile("routines/login/create.php?user="+escape(form.user.value)+"&pass="+escape(Crypt(form.pass.value))+"&email="+escape(form.email.value),function(response){switch(response){case"OK":Logged(form.user.value,form.pass.value,form.permanent.checked);break;case"ERROR EXIST":alert(_L('Ce nom d\'utilisateur existe déjà'));break;case-1:case"ERROR":alert(_L('Erreur'));break;}
form.submiter_create.disabled=false;form.submiter_create.value=_L('Creer mon compte');});}
function DeleteAccount(){if(confirm(_L('Etes-vous sur de vouloir supprimer votre compte?'))){App.ajax.GetFile("routines/login/del.php",function(response){switch(response){case'OK':Logged("","");break;default:alert(_L('Erreur'));break;}});}}
function ChangePassword(form){if(!form.oldpass.value.length||!form.newpass.value.length)return alert(_L('Erreur'));App.ajax.GetFile("routines/login/param.php?user="+escape(CookiesMan.Login)+"&pass="+escape(Crypt(form.oldpass.value))+"&npass="+escape(Crypt(form.newpass.value)),function(response){switch(response){case'OK':App.data.WriteRawCookie("PasswordEnc",escape(Crypt(form.newpass.value)));alert(_L('Mot de passe modifié'));$G('loginUser_mpdiv').style.display='none';break;default:alert(_L('Erreur'));break;}});}
function SendPassword(form){App.ajax.GetFile("routines/login/sendpassword.php?user="+escape(form.user.value),function(response){switch(response){case'OK':alert(_L('Mot de passe envoyé par mail'));break;default:alert(_L('Erreur'));break;}});ShowLoginBox();}
function ShowPasswordBox(){PopupHelper.ShowPopup('<form name="loginUser" action="javascript:;" style="font-weight:bold;font-size:12px;padding:10px;" onsubmit="SendPassword(this);"><table width="100%"><tr><td width="70%" align="left">'
+_L('Nom d\'utilisateur :')+'<br><input type="text" name="user" style="width:90%;"><br><br>'
+'</tr></table><input type="submit"  class="button" style="font-weight:bold;font-size:12px;" name="submiter_create" value="'+_L('Envoyer mot de passe')+'"></form>',_L('Envoyer mot de passe'),440);}
function ShowRegisterBox(){PopupHelper.ShowPopup('<div style="margin:10px;border:1px solid #009ADF;background:#77CAEF">'+_L('L\'inscription est gratuite. Cela vous permet de sauvegarder votre page et de pouvoir y accéder d\'où vous voulez.')+'</div><form name="loginUser" action="javascript:;" style="font-weight:bold;font-size:12px;padding:10px;" onsubmit="SuscribeUser(this);"><table width="100%"><tr><td align="left">'
+_L('Nom d\'utilisateur :')+'<br><input type="text" name="user" style="width:90%;"><br><br>'
+_L('E-Mail :')+'<br><input type="text" name="email" style="width:90%;"><br><br>'
+_L('Mot de passe :')
+'<br><input type="password" name="pass"  style="width:90%"><br>'
+_L('Confirmer le mot de passe :')
+'<br><input type="password" name="pass1"  style="width:90%">'
+'<input name="permanent" type="checkbox" style="display:none" checked="checked"><br><br>'
+'</td></tr><tr><td><input type="submit"  class="button" style="font-weight:bold;font-size:12px;" name="submiter_create" value="'+_L('Creer mon compte')+'"></td></tr></table></form>',_L('Inscription'),390);}
function ShowLoginBox(){PopupHelper.ShowPopup('<div style="margin:10px;margin-bottom:2px;padding:3px;border:1px solid #009ADF;background:#77CAEF">'+_L('L\'inscription est gratuite. Cela vous permet de sauvegarder votre page et de pouvoir y accéder d\'où vous voulez.')+'</div><form name="loginUser" action="javascript:;" style="font-weight:bold;font-size:12px;padding:10px;" onsubmit="LoginUser(this);"><table><tr><td width="70%" align="left">'
+_L('Nom d\'utilisateur :')+'<br><input type="text" name="user" style="width:90%;"><br><br>'
+_L('Mot de passe :')+'<a style="cursor:pointer" onclick="ShowPasswordBox()"> '+_L('oublié?')
+'</a>'+'<br><input type="password" name="pass"  style="width:90%"><br>'
+'<input name="permanent" type="checkbox" checked="checked">'+_L('Se Souvenir de moi')+'<br>'
+'</td><td><div style="padding:10px;border:1px solid #009ADF;background:#77CAEF"><a href="javascript:;" onclick="ShowRegisterBox()">'+_L('Pas encore membre? Inscrivez-vous c\'est gratuit!')
+'</a></div></td></tr><tr><td colspan="2" align="left"></td></tr><tr><td colspan="2"><input type="submit"  class="button" style="cursor:pointer;font-weight:bold;font-size:12px;" name="submiter" value="'+_L('Se connecter')+'"></td></tr></table></form>',_L('Connexion'),440);}
function WriteLoginBox(){if(App.data.IsLocal){document.write('<div style="text-align:center"><br><a href="javascript:;" onclick="ShowLoginBox()"><img src="include/skins/login.png"> '+_L('Vous connecter')+'</a></div>');}else{document.write('<div style="text-align:center"><a href="javascript:;" onclick="DisconnectUser()">'+_L('Connecté : ')+'<b>'+App.data.Login+'</b><br>'+_L('Se déconnecter')+'</a> - <a href="javascript:;" onclick="togledivdisplay(\'loginUserdiv\')">'+_L('Mon Compte')+'</a></div><div  id="loginUserdiv" style="z-index:900;display:none;position:absolute;border:1px solid black;padding:5px;background:#E9E9E9;width:238px;">'
+'<img align="left" src="include/skins/profil.gif"><div style="padding-top:5px;"><b>'+_L('Login :')+'</b> '+App.data.Login+'<br><b>'
+_L('E-Mail :')+'</b> '+App.data.GetCookie("UserMail")+'<br>'
+'</div><br><br><a href="javascript:;" onclick="togledivdisplay(\'loginUser_mpdiv\')">'+_L('Changer mon mot de passe')
+'</a><div id="loginUser_mpdiv" style="display:none;padding-left:15px;">'
+'<form action="javascript:;" onsubmit="ChangePassword(this);" name="pass">'
+_L('Ancien Mot de passe :')+'<input type="password" name="oldpass"><br>'
+_L('Nouveau Mot de passe :')+'<input type="password" name="newpass"><br>'
+'<input type="submit" name="submiter" value="'+_L('Valider')+'"></form>'
+'</div>'
+'<br><a href="javascript:;" onclick="DeleteAccount()">'+_L('Supprimer mon compte')
+'</a></div>');}}
App.menu=(function(){var current_section=-1;var sections=null;function Load(){if(!sections)
if(App.data.IsLocal)
sections=[App.menu.rss,null,App.menu.widgets,App.menu.widgets,null,App.menu.skin,App.menu.skin,null,App.menu.wizzard,App.menu.login,null,App.menu.search];else
sections=[App.menu.rss,null,App.menu.widgets,App.menu.widgets,null,App.menu.skin,App.menu.skin,null,App.menu.wizzard,null,App.menu.search];}
function Build(tabHTML){var HTML='<div style="background:#DADADA;height:4px;border-bottom:1px solid #B3B3B3"></div><div style="border-top: 1px solid rgb(179, 179, 179); border-bottom: 1px solid rgb(179, 179, 179); width: 100%;color:white; background-color:white;background:#74777A repeat-x url(include/skins/SettingsRightBg.jpg)" class="png_background"><table cellpadding=0 cellspacing=0 style="width:100%"><tr><td valign="top" style="background:#54585C repeat-x url(include/skins/SettingsLeftBg.jpg);border-right:1px solid #999" width="200" align="left" class="png_background"><div style="margin:10px;margin-top:30px;border-bottom:2px solid grey;height:0px;"></div>';for(var i=0;i<sections.length;i++){if(sections[i]==null){HTML+="<div style='margin:10px;border-bottom:2px solid grey;height:0px;'></div>";continue;}
HTML+="<div style='font-size:9pt;padding:2px 0px 2px 10px;margin:3px 0px 3px 10px;"+(i==current_section?"background:#999999":"")+"'><a  "+(i==current_section?"":"href='javascript:' onclick='App.menu.show("+i+")'")+">"+sections[i].getTitle(i)+"</a></div>";}
HTML+='</td><td valign="top">';HTML+=tabHTML;HTML+='</td>';HTML+='<td valign="top" align="right"><a href="javascript:;" onclick="App.menu.hide()" style="margin:2px;"><img border="0" src="include/skins/close.gif"></a></td>';HTML+='</tr></table></div><div style="background:#DADADA;height:4px;border-top:1px solid #B3B3B3"></div>';return HTML;}
return{getButton:function(){return'<table cellpadding="0" cellspacing="0" align="right"><tr><td style="padding-top:2px;padding-right:3px" valign="top">'
+(App.user.browser.ISIE6?'':'<a href="javascript:;" onclick="RssReader.ShowFeed()" title="'+_L('Lecteur RSS')+'" style="margin-right:5px;position:relative;top:-3px">'
+GetButtonImg('',106,12)
+'</a>')
+'<a href="javascript:;" onclick="ShareHelper.Share(location,document.title,\'http://www.ustart.org/include/skins/logo_ustart.png\');" title="'+_L('Bookmarker cette page')+'" style="margin-right:5px">'
+'<IMG  src="include/skins/favorite.'+(App.user.browser.ISIE6?'gif':'png')+'">'
+'</a><a href="javascript:;" onclick="ShowHelp();" title="'+_L('Afficher l\'Aide')+'">'
+'<IMG  src="include/skins/question.'+(App.user.browser.ISIE6?'gif':'png')+'">'
+'</a></td><td align="left">'
+'  <a href="javascript:;" onclick="App.menu.toggleView()">'
+App.ui.ButtonHelper.GetHTML(_L('Personnalisez votre page'))
+'</a></td></tr><tr><td colspan="2" id="menu_add"  style="text-align:left;border-top:#7F9BD9 1px solid;background:white;display:none;padding:2px;"><div id="menu_preview"></div><div style="height:400px;width:205px;overflow:auto;" id="menuscroll"></div></td></tr></table>';},toggleView:function(){switch($G('menu').style.display){case'':this.hide();break;case'none':this.show();break;}},hide:function(){if(!App.user.browser.ISIE||App.user.browser.ISIE8)
App.fx.fadeOut($G('menu'));else
$G('menu').style.display='none';},show:function(section,cat,elem){if(current_section==-1)current_section=0;if(typeof(section)!="undefined")current_section=section;var object=$G('menu');Load();object.innerHTML=Build(sections[current_section].getSection(current_section,cat,elem));App.fx.fadeIn(object);sections[current_section].postSection(current_section,cat,elem);},preview:function(widget,data){var object=$G('menu');Load();object.innerHTML=Build(this.previewWidget.getSection(widget,data));App.fx.fadeIn(object);this.previewWidget.postSection(widget,data);}}})();App.menu.skin=(function(){var skin_list=null;function ToRGB1(C,B,A){if(A>360){A-=360}else{if(A<0){A+=360}}if(A<60){C=C+(B-C)*A/60}else{if(A<180){C=B}else{if(A<240){C=C+(B-C)*(240-A)/60}}}return Math.round(C*255)}
function HSLtoRGB(C,B,A){var D,E;if(B==0){return[A,A,A]}C=C*360/255;B/=255;A/=255;if(A<=0.5){D=A+A*B}else{D=A+B-A*B}E=2*A-D;return[ToRGB1(E,D,C+120),ToRGB1(E,D,C),ToRGB1(E,D,C-120)]}
return{showColorPicker:function(elem,main){var Text='<table cellpadding="0" cellspacing="0"><tr>';for(l=20;l<=250;l+=10){Text+="<tr>";if(l==250){l=255}
for(t=0;t<=240;t+=10){var A=HSLtoRGB(t,240,l);Text+='<td onclick="App.menu.skin.setColor('+A[0]+','+A[1]+','+A[2]+','+main+');" style="background-color:rgb('+A[0]+','+A[1]+','+A[2]+');height:10px;width:10px;"></td>';}
Text+="</tr>";}
Text+='</table>';App.ui.PickerHelper.Show(elem,{margin:110,width:250,variables:[{name:"",type:"html",value:Text}],callback:null});},getTitle:function(section,cat,elem){if(section==5)
return'<IMG style="background:url(include/skins/menu_buttons.'+(App.user.browser.ISIE6?'gif':'png')+'?v=293) no-repeat 0px -25px;width:26px;height:22px;" src="JSblocks/img/s.gif" align="absmiddle">'+_L('Thème');else
return'<IMG style="background:url(include/skins/menu_buttons.'+(App.user.browser.ISIE6?'gif':'png')+'?v=293) no-repeat 0px -25px;width:26px;height:22px;" src="JSblocks/img/s.gif" align="absmiddle">'+_L('Apparence');},setTheme:function(i,elem){if(typeof(i)!="undefined"){App.skin.loadSkin({name:'xml',src:skin_list.themes[i].id});App.dom.select("div.list_item",elem.parentNode.parentNode).each(function(){this.style.background="";});elem.parentNode.style.background="#ddd";}},setColor:function(r,g,b,main){if(main){App.skin.loadSkin({name:'custom',r:r,g:g,b:b,rb:0,gb:0,bb:0,i:0});}else{App.skin.loadSkin({name:'custom',r:App.skin.getCurrentSkin().r||0,g:App.skin.getCurrentSkin().g||0,b:App.skin.getCurrentSkin().b||0,rb:r,gb:g,bb:b,i:App.skin.getCurrentSkin().i});}
App.menu.show();},setBackground:function(url,elem){App.skin.loadSkin({name:'custom',r:App.skin.getCurrentSkin().r||0,g:App.skin.getCurrentSkin().g||0,b:App.skin.getCurrentSkin().b||0,rb:App.skin.getCurrentSkin().rb,gb:App.skin.getCurrentSkin().gb,bb:App.skin.getCurrentSkin().bb,i:url});if(elem){App.dom.select("div.list_item",elem.parentNode.parentNode).each(function(){this.style.background="";});elem.parentNode.style.background="#ddd";}},openAdvancedURL:function(elem){var Content=GetButtonImg('',0,14)+" "+_L('Entrez l\'adresse URL d\'une image : ')+"<input type='text' value='http://' name='url'><input type='submit' onclick='App.menu.skin.setBackground(this.previousSibling.value,null);App.ui.PickerHelper.Hide();' value='"+_L("Ok")+"'>";App.ui.PickerHelper.Show(elem,{margin:1,width:220,variables:[{name:"",type:"html",value:Content}],callback:null});},getSection:function(section,cat,elem){if(!skin_list)
return'<div style="margin:5px;"><img src="include/skins/ajax.gif">'+_L("Chargement en cours.....")+"</div>";var HTML="";if(section==5){HTML+="<div style='padding:5px;margin:5px;margin-bottom:0px;font-size:10pt;font-weight:bold;border-bottom:1px solid #DDD'>"+_L("Choisissez un thème")+"</div><div><div style='margin:5px;height:300px;width:"+(App.user.screen.Width-248)+"px;overflow:auto;'>";for(var i=0;i<skin_list.themes.length;i++){HTML+="<div class='list_item' style='"+(App.skin.getCurrentSkin().src==skin_list.themes[i].id?"background:#ddd;":"")+";float:left;width:180px;height:140px;'><a href='javascript:;' onclick='App.menu.skin.setTheme("+i+",this)'><center><img style='margin:10px;width:150px' src='"+skin_list.themes[i].thumbnail+"'><br>"+skin_list.themes[i].title+"</center></a></div>";}
HTML+="</div></div>";}else{HTML+="<div style='padding:5px;margin:15px;margin-bottom:0px;font-size:10pt;font-weight:bold;border-bottom:1px solid #DDD'>"+_L('Choix d\'une apparence')+"</div>"
HTML+="<div style='padding:15px 0px 0px 30px;'><table width='500'><tr><td>1. "+_L("Choisissez une couleur de widget")
HTML+="<div style='margin-left:70px;width:40px;height:20px;border:1px solid #cccccc;background:white;padding:3px;'><div onclick='App.menu.skin.showColorPicker(this,1)' style='background:rgb("+(App.skin.getCurrentSkin().r||148)+","+(App.skin.getCurrentSkin().g||197)+","+(App.skin.getCurrentSkin().b||252)+");cursor:pointer;width:40px;height:20px;'></div></div>";HTML+="</td><td>"
HTML+="2. "+_L("Choisissez une couleur de page")
HTML+="<div style='margin-left:70px;width:40px;height:20px;border:1px solid #cccccc;background:white;padding:3px;'><div onclick='App.menu.skin.showColorPicker(this,0)' style='background:rgb("+(App.skin.getCurrentSkin().rb||255)+","+(App.skin.getCurrentSkin().gb||255)+","+(App.skin.getCurrentSkin().bb||255)+");cursor:pointer;width:40px;height:20px;'></div></div>";HTML+="</td></tr></table>";HTML+="<br>3. "+_L("Choisissez un fond")+" - <a href='javascript:;' onclick='App.menu.skin.openAdvancedURL(this);'>"+GetButtonImg('',0,14)+" "+_L('Avancé')+"</a><div>";HTML+="<div style='border:1px solid #DDD;margin:5px;margin-top:0px;height:340px;width:"+(App.user.screen.Width-290)+"px;overflow:auto;'>";for(var i=0;i<skin_list.backgrounds.length;i++){HTML+="<div class='list_item' style='"+(App.skin.getCurrentSkin().i==skin_list.backgrounds[i].file?"background:#ddd;":"")+";float:left;width:120px;height:80px;padding:5px;'><a href='javascript:;' onclick='App.menu.skin.setBackground(\""+skin_list.backgrounds[i].file+"\",this)'><center><div style='cursor:pointer;overflow:hidden;height:75px;width:110px;'><img height='75' style='min-width:180px;max-height:75px;margin-left:-70px;' src='"+skin_list.backgrounds[i].file+"'></div></center></a></div>";}
HTML+="</div></div>";}
return HTML;},postSection:function(section,cat,elem){if(skin_list==null)
App.ajax.GetFile("routines/compiler/skin_list.php?navlang="+App.user.browser.lang+"&timezone="+parseInt(new Date().getTimezoneOffset()/60)+'&version='+App.CurrentVersion,function(response){skin_list=eval("("+response+")");if(typeof(FacebookAPI)!="undefined"){var fqlQuery=escape("SELECT src_big FROM photo WHERE aid IN (SELECT aid FROM album WHERE owner="+FacebookAPI.User.uid+" ORDER BY rand()) ORDER BY rand() LIMIT 150");var params=new Array("query="+fqlQuery);FacebookAPI.addRequest("facebook.fql.query",params,function(response){if(response.error_code)return;for(var i=0;i<response.length;i++)
skin_list.backgrounds.push({file:response[i].src_big});App.menu.show();});}
App.menu.show();});}};})();App.menu.previewWidget=(function(){return{addCurrentWidget:function(){if(App.tab.addpreviewWidget())
$G('bloc_preview').innerHTML="<br><br><br><img src='include/skins/tick.png'> "+_L('Ajouté à votre page');},getSection:function(widget,data){var HTML="";HTML+="<div style='padding:5px;margin:5px;margin-bottom:0px;font-size:10pt;font-weight:bold;border-bottom:1px solid #DDD'>"+_L("Ajouter un bloc sur l'onglet actuel")+"</div><div style='margin:0px 5px 5px 5px'>";HTML+="<table cellpadding='0' cellspacing='0' style='width:100%;'><tr valign='top'>";HTML+="<td align='center' valign='top' style='height:300px;color:black;background:#ddd'>";HTML+="<div style='text-align:left;padding:5px;margin:5px;font-size:9pt;font-weight:bold;border-bottom:1px solid black'>"+_L("Aperçu")+"</div>";HTML+="<div id='bloc_preview' style='width:445px;'>"
+"<br><br><a href='javascript:;' style='width:200px;display:block' onclick='App.menu.previewWidget.addCurrentWidget()'>"
+App.ui.ButtonHelper.GetHTML(GetButtonImg('',68,12)+_L('Ajouter à ma page'))+"</a><br></div>";HTML+="</td></tr></table></div>";return HTML;},postSection:function(widget,data){App.tab.previewWidget(widget,data);}};})();App.menu.widgets=(function(){var widget_list=null;return{getTitle:function(section,cat,elem){if(section==2)
return'<IMG style="background:url(include/skins/menu_buttons.'+(App.user.browser.ISIE6?'gif':'png')+'?v=293) no-repeat 0px -50px;width:24px;height:22px;" src="JSblocks/img/s.gif" align="absmiddle">'+_L('Blocs personnalisables');else
return'<IMG style="background:url(include/skins/menu_buttons.'+(App.user.browser.ISIE6?'gif':'png')+'?v=293) no-repeat 0px -50px;width:24px;height:22px;" src="JSblocks/img/s.gif" align="absmiddle">'+_L('Blocs utiles');},addCurrentWidget:function(){if(App.tab.addpreviewWidget())
$G('bloc_preview').innerHTML="<br><br><br><img src='include/skins/tick.png'> "+_L('Ajouté à votre page');},getSection:function(section,cat,elem){if(!widget_list)
return'<div style="margin:5px;"><img src="include/skins/ajax.gif">'+_L("Chargement en cours.....")+"</div>";var HTML="";HTML+="<div style='padding:5px;margin:5px;margin-bottom:0px;font-size:10pt;font-weight:bold;border-bottom:1px solid #DDD'>"+_L("Ajouter un bloc sur l'onglet actuel")+"</div><div style='margin:0px 5px 5px 5px'>";HTML+="<table cellpadding='0' cellspacing='0' style='width:100%;'><tr valign='top'><td width='200'><div  style='margin-top:5px;'>";for(var i=0;i<widget_list.length;i++){if(widget_list[i].category==section-2){if(widget_list[i].id!='rss'&&widget_list[i].id!='ext')
HTML+="<div style='height:14px;"+(cat==i?"background:#ddd;":"")+"padding:2px 35px 3px 30px;'><a href='javascript:;' title='"+widget_list[i].description+"' onclick='App.menu.show("+section+","+i+")' style='"+(cat==i?"color:black":"")+"'>"+(widget_list[i].icon>""?"<span style='padding-left:-17px'>"+widget_list[i].icon+"</span>":"")+widget_list[i].title+'</a></div>';}}
HTML+="</div></td>";HTML+="<td align='center' "+(typeof(cat)=="undefined"?"valign='middle'":"valign='top'")+" style='height:300px;color:black;background:#ddd'>";if(typeof(cat)=="undefined")
HTML+=_L('Choisissez un bloc pour l\'ajouter à votre page');else{HTML+="<div style='text-align:left;padding:5px;margin:5px;font-size:9pt;font-weight:bold;border-bottom:1px solid black'>"+_L("Aperçu")+"</div>";HTML+="<div id='bloc_preview' style='width:445px;'>"
+widget_list[cat].description
+"<br><br><a href='javascript:;' style='width:200px;display:block' onclick='App.menu.widgets.addCurrentWidget()'>"+App.ui.ButtonHelper.GetHTML(GetButtonImg('',68,12)+_L('Ajouter à ma page'))+"</a><br></div>";}
HTML+="</td></tr></table></div>";return HTML;},postSection:function(section,cat,elem){if(widget_list==null)
App.ajax.GetFile("routines/compiler/widget_list.php?navlang="+App.user.browser.lang+"&timezone="+parseInt(new Date().getTimezoneOffset()/60)+'&version='+App.CurrentVersion,function(response){widget_list=eval("("+response+")");App.menu.show();});else
if(typeof(cat)!="undefined")
App.tab.previewWidget(widget_list[cat].id);}};})();App.menu.rss=(function(){var rss_list=null;return{getTitle:function(section,cat,elem){return'<IMG style="background:url(include/skins/menu_buttons.'+(App.user.browser.ISIE6?'gif':'png')+'?v=293) no-repeat -0px 0px;width:24px;height:22px;" src="JSblocks/img/s.gif" align="absmiddle">'+_L('Actualités');},addCurrentWidget:function(){if(App.tab.addpreviewWidget())
$G('bloc_preview').innerHTML="<br><br><br><img src='include/skins/tick.png'> "+_L('Ajouté à votre page');},getSection:function(section,cat,elem){if(!rss_list)
return'<div style="margin:5px;"><img src="include/skins/ajax.gif">'+_L("Chargement en cours.....")+"</div>";var HTML="";HTML+="<div style='padding:5px;margin:5px;margin-bottom:0px;font-size:10pt;font-weight:bold;border-bottom:1px solid #DDD'>"
+_L("Ajouter un fil d'actualité sur l'onglet actuel")+"</div><div style='margin:0px 5px 5px 5px'>";HTML+="<table cellpadding='0' style='width:100%' cellspacing='0'><tr valign='top'><td style='border-right:1px solid #B3B3B3' width='180'><div  style='margin-top:5px;'>";for(var i in rss_list){HTML+="<div style='height:14px;"+(cat==i?"background:#B3B3B3;":"")+"padding:2px 35px 3px 30px;'><a href='javascript:;' onclick='App.menu.show("+section+",\""+i+"\")' style='"+(cat==i?"color:black":"")+"'>"+'<img height="14" width="14" border="0" src="JSblocks/img/ico_liens.gif"/>'+i+'</a></div>';}
HTML+="</div></td>";if(cat){HTML+="<td width='200'><div  style='padding-top: 5px;overflow-x:hidden; overflow-y: auto; max-height: 420px;'>";for(var i in rss_list[cat]){HTML+="<div style='overflow:hidden;width:200px;height:14px;padding:2px 35px 3px 30px;' class='list_item'><a href='javascript:;' class='list_item' onclick='App.menu.rss.previewFeed("+section+",\""+cat+"\","+i+",this)'>"+'<img align="top" height="16" width="16" border="0" src="JSblocks/img/ico_liens.gif"/><img height="0" width="0" border="0" style="z-index:3;"  align="top" onLoad="this.height=this.width=\'16\';this.style.marginLeft=\'-16px\'" src="'+getfavicon(rss_list[cat][i].u)+'"/>'+rss_list[cat][i].t+'</a></div>';}
HTML+="</div></td>";}
HTML+="<td align='center' id='preview_rss_tab'valign='top' style='color:black;height:300px;background:#ddd'>";HTML+="<br><br><br><br><img src='include/skins/accueil_flux_rss.png'>"
+_L("<br><br>Bienvenue dans l'ajout de flux RSS.<br>Pour commencer, choisissez votre source d'information RSS dans la catégorie qui vous intéresse.");HTML+="</td></tr></table></div>";return HTML;},previewFeed:function(section,cat,index,elem){App.dom.select("div.list_item,a.list_item",elem.parentNode.parentNode).each(function(){this.style.background="";this.style.color="";});elem.style.color="black";elem.parentNode.style.background="#ddd";App.dom.select("#preview_rss_tab")[0].innerHTML="<div style='text-align:left;padding:5px;margin:5px;font-size:9pt;font-weight:bold;border-bottom:1px solid black'>"+_L("Aperçu")+"</div>"
+"<div id='bloc_preview' style='max-width:445px;'><a href='javascript:;' style='width:200px;display:block' onclick='App.menu.rss.addCurrentWidget()'>"
+App.ui.ButtonHelper.GetHTML(GetButtonImg('',68,12)+_L('Ajouter à ma page'))+"</a><br></div>";App.tab.previewWidget('rss',{URL:rss_list[cat][index].u});},postSection:function(section,cat,elem){if(rss_list==null)
App.ajax.GetFile("routines/compiler/rss_list.php?navlang="+App.user.browser.lang+"&timezone="+parseInt(new Date().getTimezoneOffset()/60)+'&version='+App.CurrentVersion,function(response){rss_list=eval("("+response+")");App.menu.show();});}};})();App.menu.search=(function(){var search_list=null;var current_search="";var search_timer=null;return{getTitle:function(section,cat,elem){return'<input id="menu_search_input" onfocus="this.select()" onkeyup="if (event.keyCode==13)App.menu.search.execSearch(this.value);else App.menu.search.search(this.value)" type="text" style="margin-left:-5px;background:white url(include/skins/menu_buttons.'+(App.user.browser.ISIE6?'gif':'png')+'?v=293) 4px 3px no-repeat;padding:4px;padding-left:24px;width:80%;" value="'
+(current_search>""?current_search:_L('Recherche'))+'">';},getSection:function(section,cat,elem){var HTML="";HTML+="<div style='padding:5px;margin:5px;margin-bottom:0px;font-size:10pt;font-weight:bold;border-bottom:1px solid #DDD'>"+_L('Rechercher une source d\'actualités')+" : "+(current_search?current_search:'')+"</div><div style='margin:0px 5px 5px 5px'>";HTML+="<table style='width:100%;' cellpadding='0' cellspacing='0'><tr valign='top'>";if(search_list){HTML+="<td width='220'><div style='margin-top:5px;'>";for(var i in search_list){HTML+="<div style='overflow:hidden;text-overflow:ellipsis;width:220px;white-space:nowrap;height:14px;padding:2px 35px 3px 30px;' class='list_item'><a href='javascript:;' class='list_item' onclick='App.menu.search.previewFeed("+section+","+i+",this)'>"+'<img align="top" height="16" width="16" border="0" src="JSblocks/img/ico_liens.gif"/><img height="0" width="0" border="0" style="z-index:3;"  align="top" onLoad="this.height=this.width=\'16\';this.style.marginLeft=\'-16px\'" src="http://'+getimgurl(search_list[i].url)+'/favicon.ico"/>'+search_list[i].title+'</a></div>';}
HTML+="</div></td>";}else
if(current_search>"")
HTML+="<td width='220'><div style='margin-top:5px;width:220px;'><img src='include/skins/ajax.gif'>"+_L("Chargement en cours.....")+"</div></td>";HTML+="<td id='preview_rss_tab' align='center' valign='top' style='width:100%;height:300px;color:black;background:#ddd'>";HTML+="<br><br><br><img src='include/skins/accueil_flux_rss.png'>"+_L("<br><br>Bienvenue dans les recherches de flux RSS.<br>Pour commencer, entrez votre recherche, une adresse de site web ou une adresse de flux rss.");HTML+="<br><iframe src='routines/rss2js/opml.php' onload='' ALLOWTRANSPARENCY='true' frameborder=0 scrolling=no height=23 width=350></iframe>";HTML+="</td></tr></table></div>";return HTML;},previewFeed:function(section,cat,elem){App.dom.select("div.list_item,a.list_item",elem.parentNode.parentNode).each(function(){this.style.background="";this.style.color="";});elem.style.color="black";elem.parentNode.style.background="#ddd";App.dom.select("#preview_rss_tab")[0].innerHTML="<div style='text-align:left;padding:5px;margin:5px;font-size:9pt;font-weight:bold;border-bottom:1px solid black'>"+_L("Aperçu")+"</div>"
+"<div id='bloc_preview' style='max-width:445px;'><a href='javascript:;' style='width:200px;display:block' onclick='App.menu.search.addCurrentWidget()'>"
+App.ui.ButtonHelper.GetHTML(GetButtonImg('',68,12)+_L('Ajouter à ma page'))+"</a><br></div>";App.tab.previewWidget('rss',{URL:search_list[cat].url});},addCurrentWidget:function(){if(App.tab.addpreviewWidget())
$G('bloc_preview').innerHTML="<br><br><br><img src='include/skins/tick.png'> "+_L('Ajouté à votre page');},OPMLAnswer:function(rss){search_list=rss;App.menu.show();},postSection:function(section,cat,elem){$G('menu_search_input').focus();},execSearch:function(terms){if(search_timer)window.clearTimeout(search_timer);if(terms)current_search=terms;search_list=null;if(current_search.toLowerCase().indexOf(".net")>-1||current_search.toLowerCase().indexOf(".com")>-1||current_search.toLowerCase().indexOf(".org")>-1||current_search.toLowerCase().indexOf(".fr")>-1){App.ajax.include("routines/compiler/rss_search.php?q="+escape(current_search));App.menu.show();}else
App.ajax.include("http://www.google.com/uds/GfindFeeds?callback=App.menu.search.search_answer&num=30&context=1&q="+escape(current_search)+"&key=ABQIAAAAdhL8yBjwVm8jDCNGKrIAvxS71_XFZEeT1DiKOwQaG-JrDZNQexSRTTx7Mw16O3VBtJdC3V_R5R1Oww&v=1.0");},search:function(terms){current_search=terms;if(search_timer)window.clearTimeout(search_timer);search_timer=window.setTimeout("App.menu.search.execSearch()",3000);},search_answer:function(value,results){if(results&&results.entries)
search_list=results.entries;else search_list=[];App.menu.show();}};})();App.menu.wizzard=(function(){return{getTitle:function(section,cat,elem){return'<a href="javascript:;" onclick="App.menu.hide();PopupHelper.ShowPopupPage(\'help/help_welcome\',\''+_L('Assistant')+'\',700);return false;"><div>'
+'<IMG style="background:url(include/skins/menu_buttons.'+(App.user.browser.ISIE6?'gif':'png')+'?v=293) no-repeat 0px -72px;width:24px;height:22px;" src="JSblocks/img/s.gif" align="absmiddle">'+_L('Assistant')+'</div></a>';}}})();App.menu.login=(function(){return{getTitle:function(section,cat,elem){return'<a href="javascript:;" onclick="App.menu.hide();ShowLoginBox();return false;"><div>'
+'<img src="include/skins/login.png" style="margin-left:4px;margin-right:8px;">'+_L('Vous connecter')+'</div></a>';}}})();